package com.example.simplesvc.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.simplesvc.entity.Node;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface NodeMapper  extends BaseMapper<Node> {

    @Select("select id,name from node where node_type=1 and expire_time > #{node.expireTime}")
    List<Node> queryActiveLeader(@Param("node") Node node);

}
